package rtdb;

import com.ht.aems.util.RtDataHandler;
import com.ht.memcached.MemCachedOpt;

import java.util.Date;
import java.util.Map;

/**
 * Created by IntelliJ IDEA.
 *
 * @author Dong Shufeng
 *         Date: 2010-11-24
 */
public class RtDataHandler_MemCached implements RtDataHandler {
    public boolean set(String key, Object value) {
        return MemCachedOpt.set(key, value);
    }

    public void set(String key, Object value, Integer hashCode) {
        MemCachedOpt.set(key, value, hashCode);
    }

    public void set(String key, Object value, Date expiry) {
        MemCachedOpt.set(key, value, expiry);
    }

    public void set(String key, Object value, Date expiry, Integer hashCode) {
        MemCachedOpt.set(key, value, expiry, hashCode);
    }

    public void add(String key, Object value) {
        MemCachedOpt.add(key, value);
    }

    public void add(String key, Object value, Integer hashCode) {
        MemCachedOpt.add(key, value, hashCode);
    }

    public void add(String key, Object value, Date expiry) {
        MemCachedOpt.add(key, value, expiry);
    }

    public void add(String key, Object value, Date expiry, Integer hashCode) {
        MemCachedOpt.add(key, value, expiry, hashCode);
    }

    public void replace(String key, Object value) {
        MemCachedOpt.replace(key, value);
    }

    public void replace(String key, Object value, Integer hashCode) {
        MemCachedOpt.replace(key, value, hashCode);
    }

    public void replace(String key, Object value, Date expiry) {
        MemCachedOpt.replace(key, value, expiry);
    }

    public void replace(String key, Object value, Date expiry, Integer hashCode) {
        MemCachedOpt.replace(key, value, expiry, hashCode);
    }

    public void delete(String key) {
        MemCachedOpt.delete(key);
    }

    public void delete(String key, Date expiry) {
        MemCachedOpt.delete(key, expiry);
    }

    public void delete(String key, Integer hashCode, Date expiry) {
        MemCachedOpt.delete(key, hashCode, expiry);
    }

    public void storeCounter(String key, Long num) {
        MemCachedOpt.storeCounter(key, num);
    }

    public long addOrIncr(String key) {
        return MemCachedOpt.addOrIncr(key);
    }

    public void incr(String key) {
        MemCachedOpt.incr(key);
    }

    public void incr(String key, Long num) {
        MemCachedOpt.incr(key, num);
    }

    public void decr(String key) {
        MemCachedOpt.decr(key);
    }

    public long decr(String key, Long num) {
        return MemCachedOpt.decr(key, num);
    }

    public Map<String, Map<String, String>> statsSlabs() {
        return MemCachedOpt.statsSlabs();
    }

    public Map<String, Map<String, String>> statsItems() {
        return MemCachedOpt.statsItems();
    }

    public boolean keyExists(String key) {
        return MemCachedOpt.keyExists(key);
    }

    public long getCounter(String key) {
        return MemCachedOpt.getCounter(key);
    }

    public Object get(String key) {
        return MemCachedOpt.get(key);
    }

    public Object get(String key, Integer hashCode) {
        return MemCachedOpt.get(key, hashCode);
    }

    public Object get(String key, Integer hashCode, boolean asString) {
        return MemCachedOpt.get(key, hashCode, asString);
    }

    public Object[] getMultiArray(String[] keys) {
        return MemCachedOpt.getMultiArray(keys);
    }

    public Object[] getMultiArray(String[] keys, Integer[] hashCodes) {
        return MemCachedOpt.getMultiArray(keys, hashCodes);
    }

    public Object[] getMultiArray(String[] keys, Integer[] hashCodes, boolean asString) {
        return MemCachedOpt.getMultiArray(keys, hashCodes, asString);
    }

    public Map<String, Object> getMulti(String[] keys) {
        return MemCachedOpt.getMulti(keys);
    }

    public Map<String, Object> getMulti(String[] keys, Integer[] hashCodes) {
        return MemCachedOpt.getMulti(keys, hashCodes);
    }

    public Map<String, Object> getMulti(String[] keys, Integer[] hashCodes, boolean asString) {
        return MemCachedOpt.getMulti(keys, hashCodes, asString);
    }
}
